package ca.etsmtl.log730.projet2.users;

import java.io.Serializable;

public class User implements Serializable, Comparable<User> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 243321785022565255L;

	
	private final String name;


	public User() {
		this("USER " + (int)(Math.random() * 100d));
	}
	public User(String n) {
		name = n;
	}
	public String getName() {
		return name;
	}

	
	public String toString() {
		return "USER:" + name;
	}
	
	public boolean equals(Object o) {
		return compareTo((User)o) == 0;
	}
	@Override
	public int compareTo(User o) {
		return toString().compareTo(o.toString());
	}

}
